<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="format-detection" content="telephone=no">
  <meta name="format-detection" content="email=no">
  <script src="../scripts/rem.js"></script>
  <title>万果田园 资讯</title>
  <link rel="shortcut icon" href="../favicon.ico">
  <link rel="stylesheet" href="../styles/global.css">
  <link rel="stylesheet" href="../styles/information-detail.css">
</head>

<body>
  <header class="header">
    <div class="logo">
      <a href="index.html">
        <img src="../images/logo.png" alt="">
      </a>
    </div>
    <div class="classify">
      <img src="../images/classify.png" alt="">
    </div>
    <nav class="nav">
      <ul class="nav-list">
        <li class="list">
          <a href="index.html">
            <div>首页</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="survey.html">
            <div>概况</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="information.html">
            <div>资讯</div>
            <div class="active"></div>
          </a>
        </li>
        <li class="list">
          <a href="business.html">
            <div>业务</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="layout.html">
            <div>布局</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="latest.html">
            <div>动态</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="record.html">
            <div>全程追溯</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="introduce-join.html">
            <div>合作</div>
            <div></div>
          </a>
        </li>
        <li class="list">
          <a href="download.html">
            <div>APP下载</div>
            <div></div>
          </a>
        </li>
      </ul>
    </nav>
  </header>
  <main id="top">
    <div class="information-detail-content">
      <div class="paceholder">
        <div class="paceholder-bg"></div>
        <div class="tc">没有更多数据了</div>
      </div>
    </div>
    <a href="#top" class="toTOP">
      顶部
    </a>
    <hr>
    <div class="btns">
      <a class="back-btn" href="information.html">返回万果资讯列表</a>
      <p>
        <span class="">上一篇：</span>
        <a href="javascript:;" class="prve-btn"></a>
      </p>
      <p>
        <span class="">下一篇：</span>
        <a href="javascript:;" class="next-btn"></a>
      </p>
    </div>
  </main>
  <footer>
    <div class="phone">电话：400-017-5917</div>
    <div class="email">邮箱：postmaster@wggyl.cn</div>
    <div class="address">地址：北京市丰台区新发地京良桥西南侧2000米路北丰合顺市场5号交易厅商01号</div>
    <div class="name-icp">万果供应链科技有限公司 京ICP备17068845号</div>
  </footer>
  <div class="loading">
    <div class="load-gif"></div>
  </div>
  <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
  <script src="../scripts/main.js"></script>
  <script>
    ~(function (params) {
      var cwh = $('body').width()
      if (cwh > 1304) {
        $('.toTOP').css('right', (cwh - 1304) / 2 * 0.57 + 'px')
      } else {
        $('.toTOP').css({
          'right': '0'
        })
      }


      function getInfoDetail() {
        $('.loading').show();
        // var ip = 'http://192.168.2.222:82',
        // var ip = 'https://check-h5.wanguowang.com',
        var ip = 'https://app.guobener.com',
          id = location.href.split('=')[1];

        $.ajax({
          type: 'get',
          url: ip + '/wap/news/selectInforDetail?id=' + id,
          success: function (res) {
            $('.loading').hide();
            if (res.result.state != '1') {
              $('.paceholder').show();
              return
            };
            $('.information-detail-content').html(
              `<div class="title">${res.data.title}</div>
              <div class="date">发布时间：${res.data.deplayTime}</div>
              <div class="hr"></div>
              <div class="text">${res.data.imageText}</div>`
            );
            if (res.data.preTitle == null && res.data.preId == null) {
              $('.prve-btn').html('已经是第一篇了')
            } else {
              $('.prve-btn').html(res.data.preTitle).attr('href', 'information-detail.html?id=' + res.data.preId)
            };
            if (res.data.nextTitle == null && res.data.nextId == null) {
              $('.next-btn').html('已经是最后一篇了')
            } else {
              $('.next-btn').html(res.data.nextTitle).attr('href',
                'information-detail.html?id=' + res.data.nextId)
            }
          }
        })
      }
      getInfoDetail()
    })()
    $(window).scroll((e) => {
      var cht = document.documentElement.clientHeight,
        ctp = document.documentElement.scrollTop,
        top = document.documentElement.scrollHeight,
        diff = top - ctp - cht
      if (350 > ctp) {
        $('.toTOP').fadeOut()
      } else {
        $('.toTOP').fadeIn()
      }
    })
  </script>
</body>

</html>
